package net.monare.mifss.evn;

import com.vaadin.ui.UI;
import net.monare.mifss.admin.ui.win.ConfigureStoragePoolWindow;
import net.monare.mifss.admin.ui.win.ConfigureStorageWindow;
import net.monare.mifss.configurations.pojo.ContentPoolDef;

import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;

public class ConfigureSelectedPoolListener implements ClickListener {

	private static final long serialVersionUID = -6145297225675901957L;

	private final ConfigureStorageWindow parent;
	private final ContentPoolDef contentPoolDef;

	public ConfigureSelectedPoolListener(ConfigureStorageWindow parent, ContentPoolDef contentPoolDef) {
		this.parent = parent;
		this.contentPoolDef = contentPoolDef;
	}

	public void buttonClick(ClickEvent event) {
        UI.getCurrent().addWindow(new ConfigureStoragePoolWindow(parent, contentPoolDef, parent.getCurrentStorageDef()));
    }

}
